package com.fenghongzhang.kuaishou.index.home.model;

import com.fenghongzhang.kuaishou.common.ShuaiFengServerApi;
import com.fenghongzhang.kuaishou.index.home.contract.AttentFragmentContract;
import com.fenghongzhang.kuaishou.index.home.entity.VideoBean;
import com.fenghongzhang.kuaishou.utils.ResponseBean;
import com.fenghongzhang.kuaishou.utils.RetrofitManager;
import com.fenghongzhang.mvp_lib.model.BaseModel;

import java.util.List;

import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

public class AttentModel implements AttentFragmentContract.IAttentModel {

    @Override
    public void getVideoList(Observer<ResponseBean<List<VideoBean>>> observer) {
        RetrofitManager.getInstance().getShuaiFengServerRetrofit()
                .create(ShuaiFengServerApi.class)
                .getAttentBean()
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(observer);
    }

    @Override
    public void destroy() {

    }
}
